package cn.lanqiao.mapper;


import cn.lanqiao.pojo.Orders;
import cn.lanqiao.pojo.Users;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.FetchType;
@CacheNamespace(blocking = true)
public interface OrderMapper {

    @Select({"select * from orders where oid=#{oid}"})
    @Results(value = {@Result(id = true,column ="oid",property = "oid"),
    @Result(column ="order_time",property = "orderTime"),
    @Result(column = "total_price",property = "totalPrice")})
            /*
    @Result(column = "uid", property = "users",javaType = Users.class, one = @One(select ="cn.lanqiao.mapper.UserMapper.selectUserByUid",fetchType = FetchType.LAZY))})*/
    public Orders selectOrderAndUserByOid(Integer oid);
}
